package com.pwt.entity;

import io.swagger.v3.oas.annotations.media.Schema;
import com.pwt.entity.base.BaseEntity;
import javax.persistence.*;
import lombok.EqualsAndHashCode;
import lombok.Data;

import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;


/**
 * 附件
 *
 * @author auto generated
 * @date 2021-09-02 10:43:16
 */
@EqualsAndHashCode(callSuper = true)
@Data
@Entity
@Table(name = "[attachment]")
@Schema(name = "附件")
@DynamicInsert
@DynamicUpdate
public class Attachment extends BaseEntity {

	/**
	 * 名称
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "name",description = "名称")
	@Column(name = "name", nullable = true, length = 50)
	private String name;

	/**
	 * 备注
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "remark",description = "备注")
	@Column(name = "remark", nullable = true, length = 255)
	private String remark;

	/**
	 * 路径
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "path",description = "路径")
	@Column(name = "path", nullable = true, length = 255)
	private String path;

	/**
	 * 缩略图路径
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "thumb",description = "缩略图路径")
	@Column(name = "thumb", nullable = true, length = 255)
	private String thumb;

	/**
	 * 访问地址
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "url",description = "访问地址")
	@Column(name = "url", nullable = true, length = 255)
	private String url;

	/**
	 * minetype
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "mime",description = "mimetype")
	@Column(name = "mime", nullable = true, length = 255)
	private String mime;

	/**
	 * 文件类型
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "ext",description = "文件类型")
	@Column(name = "ext", nullable = true, length = 255)
	private String ext;

	/**
	 * 摘要值
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "md5",description = "摘要值")
	@Column(name = "md5", nullable = true, length = 255)
	private String md5;

	/**
	 * 散列值
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "sha1",description = "散列值")
	@Column(name = "sha1", nullable = true, length = 255)
	private String sha1;

	/**
	 * 宽度
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "width",description = "宽度")
	@Column(name = "width", nullable = true)
	private Integer width;

	/**
	 * 高度
	 * nullable : true
	 * default  : null
	 */
	@Schema(name = "height",description = "高度")
	@Column(name = "height", nullable = true)
	private Integer height;

	@Schema(name = "size",description = "大小")
	@Column(name = "size",nullable = true)
	private Long size;
}
